-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add autocomplete jail name function #750
Conversation
This will allow a user to simple begin typing a jail name. If bastille finds more than one jail starting with what is typed, it will error. If it only find one jail, it will set that jail as the $TARGET
@yaazkal Do you think this is a necessary addition? It is not strictly necessary, but it is a decent enhancement. A few things i noticed is that some commands are not registered with this function, namely
This function would have to be called in their own CMD file. |
I've now added the function to all necessary CMD files. |
Why not add to bash completions? |
Go on… I suppose “tab-ing” would work also though. |
Using tab will not work. If you have any type of directory in the root (or wherever you run bastille command from) it will auto complete directories and files in PWD. I think it better to use the function as-is. |
@tschettervictor funny this is very recent. I couldn't find any completion scripts for zsh (or bash) to have proper Bastille completion support in the shell. That'd include suggestions for subcommands, options and jails. Is this by any chance planned, or if it isn't, would adding completions for zsh or bash be accepted as a PR? |
@yaazkal Thoughts? |
Closed in favor of #758 which improves handling of this function. |
This will allow a user to simple begin typing a jail name. If bastille finds more than one jail starting with what is typed, it will error. If it only find one jail, it will set that jail as the $TARGET